package com.ease.platform.auditlog.support;

import org.aopalliance.intercept.MethodInvocation;

import com.ease.model.system.AuditLog;
import com.ease.platform.usercontext.vo.UserContext;

public class AuditLogInterceptor extends AbstractAuditLogInterceptor {

	public AuditLog popluateAuditLog(MethodInvocation invocation, UserContext userContext) {
		AuditLog auditLog = new AuditLog();
		auditLog.setUsername(userContext.getOperator());
		auditLog.setUserId(userContext.getUserId());
		auditLog.setBeginTime(userContext.getOperateTime());
		auditLog.setInterfaceOperation(getFirstProxiedInterfaceOperation(invocation));
		return auditLog;
	}
}
